package com.wenlin.myproduction.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 文琳
 * @Email 377979485@qq.com
 * @desc
 * @time 2023-02-09 星期四 11:41
 */
public class ScheduleRecordBean implements Parcelable {
    private List<ListsDTO> lists;

    public ScheduleRecordBean(List<ListsDTO> lists) {
        this.lists = lists;
    }

    public List<ListsDTO> getLists() {
        return lists;
    }

    public void setLists(List<ListsDTO> lists) {
        this.lists = lists;
    }

    public static class ListsDTO implements Parcelable {
        private String id;
        private List<String> schedule_arr;
        private List<Integer> is_night_arr;
        private List<String> drt_arr;
        private String realname;

        public ListsDTO(String id, List<String> schedule_arr, List<Integer> is_night_arr, List<String> drt_arr, String realname) {
            this.id = id;
            this.schedule_arr = schedule_arr;
            this.is_night_arr = is_night_arr;
            this.drt_arr = drt_arr;
            this.realname = realname;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public List<String> getSchedule_arr() {
            return schedule_arr;
        }

        public void setSchedule_arr(List<String> schedule_arr) {
            this.schedule_arr = schedule_arr;
        }

        public List<Integer> getIs_night_arr() {
            return is_night_arr;
        }

        public void setIs_night_arr(List<Integer> is_night_arr) {
            this.is_night_arr = is_night_arr;
        }

        public List<String> getDrt_arr() {
            return drt_arr;
        }

        public void setDrt_arr(List<String> drt_arr) {
            this.drt_arr = drt_arr;
        }

        public String getRealname() {
            return realname;
        }

        public void setRealname(String realname) {
            this.realname = realname;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeStringList(this.schedule_arr);
            dest.writeList(this.is_night_arr);
            dest.writeStringList(this.drt_arr);
            dest.writeString(this.realname);
        }

        protected ListsDTO(Parcel in) {
            this.id = in.readString();
            this.schedule_arr = in.createStringArrayList();
            this.is_night_arr = new ArrayList<Integer>();
            in.readList(this.is_night_arr, Integer.class.getClassLoader());
            this.drt_arr = in.createStringArrayList();
            this.realname = in.readString();
        }

        public static final Creator<ListsDTO> CREATOR = new Creator<ListsDTO>() {
            @Override
            public ListsDTO createFromParcel(Parcel source) {
                return new ListsDTO(source);
            }

            @Override
            public ListsDTO[] newArray(int size) {
                return new ListsDTO[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeTypedList(this.lists);
    }

    protected ScheduleRecordBean(Parcel in) {
        this.lists = in.createTypedArrayList(ListsDTO.CREATOR);
    }

    public static final Creator<ScheduleRecordBean> CREATOR = new Creator<ScheduleRecordBean>() {
        @Override
        public ScheduleRecordBean createFromParcel(Parcel source) {
            return new ScheduleRecordBean(source);
        }

        @Override
        public ScheduleRecordBean[] newArray(int size) {
            return new ScheduleRecordBean[size];
        }
    };
}
